package service.serviceImpl;

import dao.ClassDao;
import dao.Impl.ClassDaoImpl;
import po.Class;
import service.ClassService;

import java.util.List;

public class ClassServiceImpl implements ClassService {
    private ClassDao dao=new ClassDaoImpl();
    @Override
    public List<Class> queryAllClass(Integer gid) {
        List<Class> classes = dao.queryAll(gid);
        return  classes;
    }

    @Override
    public void delete(Class c) {
       dao.delete(c);
    }

    @Override
    public void insert(Class c) {
dao.insert(c);
    }

    @Override
    public void update(Class c) {
dao.update(c);
    }

    @Override
    public Class queryOne(Integer id) {
        Class aClass = dao.queryOne(id);
        return aClass;
    }
}
